package com.wzz.es;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @author DarkClown
 * @date 2024-08-12 17:17
 * @project_name day0812-month
 * @parem
 **/
@Data
@Document(indexName = "indent_es",shards = 1,replicas = 1)
public class IndentEs {
    @Id
    @TableId(type = IdType.AUTO)
    @Field(type = FieldType.Keyword)
    private Integer id;
    @Field(type = FieldType.Integer)
    private Integer gid;
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date buyTime;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String name;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String username;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String mobile;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String addr;

}
